<!DOCTYPE html>
<html>
<head>
	<title>点播1级</title>
	<link rel="stylesheet" type="text/css" href="../css/reset.css">
	<link rel="stylesheet" type="text/css" href="../css/public.css">
	<!-- <style type="text/css" media="screen">
        /*左侧*/
        #widgetContentx0 {
        	width: 50%;
        	height: 100%;
        	float: left;
        }
        /*左侧  上*/
        #widgetContentx0y0 {
        	width: 100%;
        	height: 66.66%;
        	float: left;
        }
        /*左侧  下*/
        #widgetContentx0y1 {
        	width: 100%;
        	height: 33.33%;
        	float: left;
        }
        #widgetContentx0y1 ul {
        	width: 100%;
        	height: 100%;
        	overflow: hidden;
        }
        #widgetContentx0y1 li {
        	width: 50%;
        	height: 100%;
        	float: left;
        }
        /*右侧*/
        #widgetContentx1 {
        	width: 50%;
        	height: 100%;
        	float: left;
        }
        #widgetContentx1 ul {
        	width: 100%;
        	height: 100%;
        	overflow: hidden;
        }
        #widgetContentx1 li {
        	width: 50%;
        	height: 33.33%;
        	float: left;
        }
	</style> -->
</head>
<body>
<div id="p11" class="box">	
	<div class="bx-header" id="p11y0">
		<div class="bx-header-left" id="p11y0x0">
			<img src="../images/home/logo.png" alt="">
		</div>
		<div class="header_middle" id="p11y0x1">

			<span>直播</span>

		</div>
		<div class="bx-header-right" id="p11y0x2">
			<div class="header-right-left" id="p11y0x2x0" tabindex="-1">
			
			</div>
			<div  class="header-right-right" id="p11y0x2x1">
				<div class="bx-time" id="bx_time">
					
				</div>
			</div>
		</div>
	</div>
	<div class="bx-nav2" id="p11y1">
		<!-- <ul id="p11y1ul">
			<li tabindex="-1" class="heightLine">篮球</li>
			<li tabindex="-1">足球</li>
			<li tabindex="-1">乒羽</li>
			<li tabindex="-1">高尔夫</li>
			<li tabindex="-1">汽摩</li>
			<li tabindex="-1">电子竞技</li>
			<li tabindex="-1">垂钓</li>
		</ul> -->
	</div>
	<div class="bx-content2" id="p11y2">

		<div class="bx-ver-nav" id="p11y2x0">
			<!-- <ul id="p11y2x0ul">
				<li tabindex="-1" class="heightLine">NBA</li>
				<li tabindex="-1">NCAA</li>
				<li tabindex="-1">CBA</li>
				<li tabindex="-1">城市传奇</li>
			</ul> -->
		</div>

		<div class="bx-list-box" id="p11y2x1">
			<div id="widget1" style="width: 100%;height: 100%">
				
			</div>
		</div>
	</div>
</div>
<script src="../js/jquery.min.js"></script>
<script src="../js/public.js"></script>
<script src="../js/widget1.js"></script>
<script>
	//根据大类获取专栏列表url
	var bigClassURL = "";
	//*根据专栏id获取该专栏列表*/
	var columnListUrl = "";
	/*根据专栏列表id获取专栏数据*/
	var columnListDataUrl = "";
	/*根据专栏列表id获取专栏推荐位*/
	var columnListRecommendUrl = "";

	
	var subHomeGlobalData = {};

	subHomeGlobalData.currentBigClassId = $.getUrlParam('bigClassId')?$.getUrlParam('bigClassId'):0;
	subHomeGlobalData.currentListId = $.getUrlParam('ListId')?$.getUrlParam('ListId'):0;
	subHomeGlobalData.columnId = $.getUrlParam('columnId')?$.getUrlParam('columnId'):"2001";
	subHomeGlobalData.bigClass = $.getUrlParam('bigClass')?$.getUrlParam('bigClass'):"1001";

	getBigClass();

	function getBigClass(){
		/*$.get(bigClassURL,function(data){

    	},"json")*/
    	var data = [{
    		id:0,
    		name:"篮球",
    	},{
    		id:1,
    		name:"足球",
    	},{
    		id:2,
    		name:"乒羽",
    	},{
    		id:3,
    		name:"高尔夫",
    	},{
    		id:4,
    		name:"汽摩",
    	},{
    		id:5,
    		name:"电子竞技",
    	},{
    		id:6,
    		name:"垂钓",
    	}]

    	var liStr = "";

		for(var i = 0; i < data.length; i++){

			if(subHomeGlobalData.currentBigClassId == data[i].id){
				liStr += "<li tabindex='-1' class='heightLine'>"+data[i].name+"</li>"
			}else{
				liStr += "<li tabindex='-1'>"+data[i].name+"</li>"
			}

			
		}

    	var str = "<ul id='p11y1ul'>\
			"+liStr+"\
		</ul>"

		$("#p11y1").html(str);

		getColumnList();
	}
	
	/*根据大类获取一级专栏列表*/
    function getColumnList(){

    	/*$.get(columnListUrl,{id:subHomeGlobalData.currentBigClassId},function(data){

    	},"json")*/
    	var data = [{
    		id:0,
    		name:"NBA",
    	},{
    		id:1,
    		name:"NCAA",
    	},{
    		id:2,
    		name:"CBA",
    	},{
    		id:3,
    		name:"城市传奇",
    	}];
    	
 		var liStr = "";

		for(var i = 0; i < data.length; i++){

			if(subHomeGlobalData.currentListId == data[i].id){
				liStr += "<li tabindex='-1' class='heightLine'>"+data[i].name+"</li>"
			}else{
				liStr += "<li tabindex='-1'>"+data[i].name+"</li>"
			}	
		}

    	var str = "<ul id='p11y2x0ul'>\
			"+liStr+"\
		</ul>"

		$("#p11y2x0").html(str);

		getColumnListData();

    }
	/*根据专栏id获取该专栏的二级列表*/
   /* function getColumnList(columnId){

    	
    }*/

	/*
	根据二级专栏列表id获取专栏数据
	包括推荐位数据
	*/
	function getColumnListData(column2Id){

		/*$.get(columnListDataUrl,{id:column2Id},function(data){
			
    	},"json")*/
    	/*$.get(columnListRecommendUrl,{id:column2Id},function(data){
			
    	},"json")*/


		var data = {};
		data.recommend = [{
			image:"../images/onDemand2/tu_2.png",
			description:"猛龙vs快船 直播中"
		}];
		data.ContentList = [
			{
				image:"../images/onDemand2/tu_3.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_4.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_5.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_6.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_7.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_8.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_9.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_9.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_8.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_7.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_6.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_5.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_4.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_3.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_2.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_3.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_4.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_5.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_6.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_3.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_2.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_8.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_3.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_7.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_3.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_2.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_4.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_9.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_5.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_2.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_7.png",
				description:"猛龙vs快船",
				date:"03月20号"
			},{
				image:"../images/onDemand2/tu_1.png",
				description:"猛龙vs快船",
				date:"03月20号"
			}
		];

		widget1Init(data.recommend,data.ContentList,0);
	}


	
	//Y0 焦点事件 
	function p11y0x2x0(event,dom,dir){
		switch(event){
			case "MoveFocus":
				switch(dir){
					case "up":
						console.log("不进行任何操作")
						break;
					case "down":
						setFocus("p11y1ul");
						break;
					case "left":
						console.log("y0left不进行任何操作")
						break;
					case "right":
						console.log("y0right不进行任何操作")
						break;
				}
				break;
			case "Back":
				window.location.href = hdLocation+"live.html";
				break;
			case "Click":
				window.location.href = hdLocation+"collect.html?prePage=live1";
				break;
		}
	}
	//Y1 焦点事件 
	function p11y1(event,dom,dir){
		switch(event){
			case "MoveFocus":
				switch(dir){
					case "up":
						setFocus("p11y0x2x0");
						break;
					case "down":
						setFocus("p11y2x0ul");
						break;
					case "left":
						break;
					case "right":
						break;
				}
				break;
			case "Back":
				break;
			case "Click":
				break;
		}
	}
	function p11y1ul(event,dom,dir){
		switch(event){
			case "MoveFocus":
				if(ulIsBorder(dom,dir,7,7)){
					onSelect(event,dom.parent().parent(),dir);
				}
				break;
			case "Back":

				window.location.href = hdLocation+"home.html";

				break;
			case "Click":
				
				dom.addClass("heightLine").siblings().removeClass('heightLine');

				break;
		}
	}
	//Y2 焦点事件 
	function p11y2(event,dom,dir){
		switch(event){
			case "MoveFocus":
				switch(dir){
					case "up":
						setFocus("p11y1ul");
						break;
					case "down":
						console.log("y2不进行任何操作")
						break;
					case "left":
						console.log("y2不进行任何操作")
						break;
					case "right":
						console.log("y2不进行任何操作")
						break;
				}
				break;
			case "Back":
				setFocus("p11y1ul");
				break;
			case "Click":
				break;
		}
	}
	function p11y2x0(event,dom,dir){
		switch(event){
			case "MoveFocus":
				switch(dir){
					case "up":
						onSelect(event,dom.parent(),dir);
						break;
					case "down":
						onSelect(event,dom.parent(),dir);
						break;
					case "left":
						onSelect(event,dom.parent(),dir);
						break;
					case "right":
						setFocus("widgetContentx0y0");
						break;
				}
				break;
			case "Back":
				onSelect(event,dom.parent());
				break;
			case "Click":
				break;
		}
	}
	function p11y2x1(event,dom,dir){
		switch(event){
			case "MoveFocus":
				switch(dir){
					case "up":
						onSelect(event,dom.parent(),dir);
						break;
					case "down":
						onSelect(event,dom.parent(),dir);
						break;
					case "left":
						setFocus("p11y2x0ul");
						break;
					case "right":
						onSelect(event,dom.parent(),dir);
						break;
				}
				break;
			case "Back":
				setFocus("p11y2x0ul");
				break;
			case "Click":
				break;
		}
	}



	function p11y2x0ul(event,dom,dir){
		switch(event){
			case "MoveFocus":
				if(ulIsBorder(dom,dir,1,4)){
					onSelect(event,dom.parent().parent(),dir);
				}
				break;
			case "Back":
				onSelect(event,dom.parent());
				break;
			case "Click":
				dom.addClass("heightLine").siblings().removeClass('heightLine');
				break;
		}
	}


</script>
</body>
</html>